package com.imooc.o2o.service;

import com.imooc.o2o.dto.ImageHolder;
import com.imooc.o2o.dto.ShopExecution;
import com.imooc.o2o.entity.Shop;
import com.imooc.o2o.exception.ShopOperationException;

import java.io.File;
import java.io.InputStream;

/**
 * Created by Knight on 2018/7/2.
 */
public interface ShopService {

    /**
     * 根据shopCondition返回数据
     * @param shopCondition
     * @param pageIndex
     * @param pageSize
     * @return
     */
    public ShopExecution getShopList(Shop shopCondition,int pageIndex,int pageSize);

    /**
     * 通过店铺id获取店铺信息
     * @param shopId
     * @return
     */
    Shop getByShopId(long shopId);

    /**
     * 更新店铺信息,包括对图片的处理
     * @param shop
     * @param imageHolder
     * @return
     */
    ShopExecution modifyShop(Shop shop,ImageHolder imageHolder)throws ShopOperationException;



    /**
     * 提交店铺
     * @param shop
     * @param imageHolder
     * @return
     */
//    ShopExecution addShop(Shop shop, File shopImg)throws ShopOperationException;
    ShopExecution addShop(Shop shop, ImageHolder imageHolder) throws ShopOperationException;

    /**
     * 查询该用户下面的店铺信息
     *
     * @param long employyeeId
     * @return List<Shop>
     * @throws Exception
     */
    ShopExecution getByEmployeeId(long employeeId) throws RuntimeException;
}
